package com.hiss.basic.model.system.request;

import com.hiss.basic.model.system.domain.SysParameterDomain;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AutoMapper(target = SysParameterDomain.class)
public class SysParameterCreateRequest implements Serializable {

    private static final long serialVersionUID = 1;

    /**
     * 参数名称
     */
    @NotBlank(message = "参数名称不能为空")
    private String name;

    /**
     * 参数键名
     */
    @NotBlank(message = "参数键名不能为空")
    private String key;

    /**
     * 参数键值
     */
    @NotBlank(message = "参数键值不能为空")
    private String value;

    /**
     * 备注
     */
    private String remark;

    /**
     * 启用状态
     *
     * @see com.hiss.basic.starter.core.enums.EnableStatusEnum
     */
    @NotNull(message = "参数值类型不能为空")
    @Range(min = 0, max = 1, message = "非法启用状态值")
    private Integer enableStatus;
}
